package com.ruoyi.web.wx.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.useragreement.domain.Agreement;
import com.ruoyi.useragreement.service.AgreementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "用户协议")
@RestController
@RequestMapping("/wx/userAgreement")
public class WxUserAgreementController {

    @Autowired
    private AgreementService userAgreementService;

    /**
     * 查询【请填写功能名称】列表
     */
    @ApiOperation("查询所有用户协议列表")
    @GetMapping("/list")
    public AjaxResult list(Agreement userAgreement) {
        List<Agreement> agreements = userAgreementService.selectUserAgreementList(userAgreement);
        return AjaxResult.success(agreements.get(0));
    }

}
